
include $(ACM_ROOT)/src/common_lib_macro.mk

EMC_FLAGS = -fPIC
LOCAL_CPPFLAGS = \
  $(COMMON_LIB_CPPFLAGS) -g

LINK_FLAGS = -lpthread

vpath %.h include

# Alhabetically arranged.
C_SRC = \
	timer_wheel.c \
	worker_queue.c \
	main.c

C_OBJS = $(C_SRC:.c=.o)
BIN = main 

all: build

build: $(BIN)

$(BIN): $(C_OBJS)
	$(CC) $^ $(LINK_FLAGS) -o $@ 

.PHONY: clean
clean : 
	$(RM) $(C_OBJS) $(BIN)

ifneq ($(MAKECMDGOALS),clean)
-include $(C_SRC:.c=.d)
endif
